﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="doanhso_banhang.ascx.cs" Inherits="eDream.Page.doanhso_banhang" %>
<%@ Register Assembly="DevExpress.Web.v12.2, Version=12.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v12.2, Version=12.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v12.2, Version=12.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxCallbackPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v12.2, Version=12.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>


<div style="margin-top: 20px">

    <div style="float:right; margin-right:300px">
                    <dx:ASPxButton ID="btnTim" runat="server" Text="Tìm" Theme="iOS" AutoPostBack="false" OnClick="btnTim_Click">
                        
                    </dx:ASPxButton>
                </div>

    <dx:ASPxCallbackPanel ID="ASPxCallbackPanel1" runat="server" ClientInstanceName="cpanl" Width="100%" OnCallback="ASPxCallbackPanel1_Callback">
        <PanelCollection>
            <dx:PanelContent>
                <div class="cloum_text">
                    Từ ngày
                </div>
                <div class="cloum_1">
                    <dx:ASPxDateEdit ID="dteFrom" runat="server" Theme="DevEx" Height="29px"></dx:ASPxDateEdit>
                </div>
                <div class="cloum_text">
                    Đến ngày
                </div>
                <div class="cloum_1">
                    <dx:ASPxDateEdit ID="dteTo" runat="server" Theme="DevEx" Height="29px"></dx:ASPxDateEdit>
                </div>

                
                <div class="Clear"></div>
                <div style="height:20px"></div>
                 <div class="Clear"></div>
                <dx:ASPxGridView ID="grvResult" runat="server" Theme="DevEx" Width="100%" KeyFieldName="ID" OnLoad="grvResult_Load">
                     <Columns>
                      
                         <dx:GridViewDataTextColumn Caption="STT" Name="colRowID" VisibleIndex="0"
                                Width="20px">
                                <DataItemTemplate>
                                    <dx:ASPxLabel ID="lblRowID" runat="server" Text='<%# Container.ItemIndex + 1 %>'>
                                    </dx:ASPxLabel>
                                </DataItemTemplate>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn ShowInCustomizationForm="True" Caption="Tên khách hàng" VisibleIndex="1" FieldName="tenKhachhang" Width="20%">
                                <HeaderStyle Font-Bold="true" Wrap="True" HorizontalAlign="Center"/>
                                <CellStyle Wrap="True"></CellStyle>
                                
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn ShowInCustomizationForm="True" Caption="Tên mặt hàng" VisibleIndex="2" FieldName="iProName" Width="20%">
                                 <HeaderStyle Font-Bold="true" Wrap="True" HorizontalAlign="Center"/>
                                <CellStyle Wrap="True"></CellStyle>
                                
                             </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn ShowInCustomizationForm="True" Caption="Số lượng" VisibleIndex="3" FieldName="Soluong" Width="10%">
                                 <HeaderStyle Font-Bold="true" Wrap="True" HorizontalAlign="Center"/>
                                <CellStyle Wrap="True"></CellStyle>
                                
                            </dx:GridViewDataTextColumn>
                         <dx:GridViewDataTextColumn ShowInCustomizationForm="True" Caption="Giá bán lẻ " VisibleIndex="4" FieldName="iDongiamoi" Width="15%">
                                 <HeaderStyle Font-Bold="true" Wrap="True" HorizontalAlign="Center"/>
                                <CellStyle Wrap="True"></CellStyle>
                                
                            </dx:GridViewDataTextColumn>
                          <dx:GridViewDataTextColumn ShowInCustomizationForm="True" Caption="% Chiết khấu " VisibleIndex="5" FieldName="chietkhau" Width="10%">
                                 <HeaderStyle Font-Bold="true" Wrap="True" HorizontalAlign="Center"/>
                                <CellStyle Wrap="True"></CellStyle>
                                
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataDateColumn ShowInCustomizationForm="True" Caption="Ngày giao dịch" VisibleIndex="6" FieldName="ngaygiaodich" Width="15%">
                                 <HeaderStyle Font-Bold="true" Wrap="True" HorizontalAlign="Center"/>
                                <CellStyle Wrap="True"></CellStyle>
                                <PropertiesDateEdit DisplayFormatString="dd/MM/yyyy"></PropertiesDateEdit>
                            </dx:GridViewDataDateColumn>
                            <dx:GridViewDataTextColumn ShowInCustomizationForm="True" Caption="Hoa Hồng" VisibleIndex="7" FieldName="pay" Width="10%">
                                 <HeaderStyle Font-Bold="true" Wrap="True" HorizontalAlign="Center"/>
                                <CellStyle Wrap="True"></CellStyle>
                                <FooterCellStyle ForeColor="Red" Font-Bold="true"></FooterCellStyle>
                            </dx:GridViewDataTextColumn>
                           
                        </Columns>
                        <Settings ShowFooter="true" ShowFilterRow="true" ShowFilterBar="Auto" />
                        <TotalSummary>
                            <dx:ASPxSummaryItem FieldName="pay" SummaryType="Sum"  DisplayFormat="C0"/>
                        </TotalSummary>
                      <SettingsPager Mode="ShowAllRecords" ></SettingsPager>
                       <SettingsBehavior AllowSort="true" />
                </dx:ASPxGridView>
            </dx:PanelContent>
            </PanelCollection>
        </dx:ASPxCallbackPanel>
    </div>